
import 'package:package_info_plus/package_info_plus.dart';

class AppInfoUtil{
  static PackageInfo packageInfo;
  static init() async{
    packageInfo = await PackageInfo.fromPlatform();
  }
  static dynamic getVersionString(){
    return packageInfo.version.toString();
  }

  static dynamic getAppNameString(){
    return packageInfo.appName.toString();
  }

  static dynamic getBuildNumberString(){
    return packageInfo.buildNumber.toString();
  }

  static dynamic getPackageNameString(){
    return packageInfo.packageName.toString();
  }
  //APP名称
  String appName = packageInfo.appName;
  //包名
  String packageName = packageInfo.packageName;
  //版本名
  String  version = packageInfo.version;
  //版本号
  String buildNumber = packageInfo.buildNumber;

}